-- GENERATED SPELL FOR [Past You] --


function spell0_32331(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(47071,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32331', 2266, 1)
end

function spell1_32331(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(37369,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32331', 4337, 1)
end

function spell2_32331(pUnit, Event) --@Hemorrhage,n/a--
pUnit:FullCastSpellOnTarget(45897,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32331', 10000, 1)
end

function spell3_32331(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(58843,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32331', 624, 1)
end

function spell4_32331(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_32331', 559, 1)
end

function spell5_32331(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_32331', 2000, 1)
end

function spell6_32331(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(40652,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32331', 10315, 1)
end

function Sorts_32331(pUnit, Event)
local choix_sorts_32331 = math.random(0, 6)
if choix_sorts_32331 == 0 then
pUnit:RegisterEvent('spell0_32331', 1, 1)
end
if choix_sorts_32331 == 1 then
pUnit:RegisterEvent('spell1_32331', 1, 1)
end
if choix_sorts_32331 == 2 then
pUnit:RegisterEvent('spell2_32331', 1, 1)
end
if choix_sorts_32331 == 3 then
pUnit:RegisterEvent('spell3_32331', 1, 1)
end
if choix_sorts_32331 == 4 then
pUnit:RegisterEvent('spell4_32331', 1, 1)
end
if choix_sorts_32331 == 5 then
pUnit:RegisterEvent('spell5_32331', 1, 1)
end
if choix_sorts_32331 == 6 then
pUnit:RegisterEvent('spell6_32331', 1, 1)
end
end

function mob32331_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32331', math.random(1500, 3000), 1)
end

function mob32331_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32331_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32331_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32331, 1, 'mob32331_Action')
RegisterUnitEvent(32331, 2, 'mob32331_Leave')
RegisterUnitEvent(32331, 3, 'mob32331_Kill')
RegisterUnitEvent(32331, 4, 'mob32331_Die')
